package com.wowudi.web.controller;



import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wowudi.entity.Department;
import com.wowudi.mapper.DepartmentMapper;
import com.wowudi.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;


import java.util.List;


@Controller
@RequestMapping("admin")
public class TEmployeeController {
    @Autowired
    private DepartmentService departmentService;

    @Autowired
    private DepartmentMapper departmentMapper;

    @RequestMapping("user")
    public String seclet(int id) {
        QueryWrapper<Department> wrapper = new QueryWrapper<>();
        Page<Department> page = new Page<>();
        wrapper.eq("dp_id", id);
        IPage<Department> iPage = departmentMapper.selectPage(page,wrapper);
        System.out.println(iPage);
        return "admin/welcome";
    }

}
